package com.yunhe.common.model.data;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.Objects;

/**
 * 日循环度电收益对象
 *  该类的设备代码是特殊的,同时有电站也有储能单元
 * @author liuronglei
 * @desc 度电收益(日)对象定义
 * @date 2019/5/17 14:21:00
 */
public class CostProfitDay {

    private Long devCode;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dtime;

    private Double incomeVal;

    private Double cycleIncome;

    private Double chargeVal;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    public CostProfitDay() {
    }

    public CostProfitDay(Long devCode, Date dtime, Double incomeVal, Double cycleIncome, Double chargeVal,Date startTime, Date endTime) {
        this.devCode = devCode;
        this.dtime = dtime;
        this.incomeVal = incomeVal;
        this.cycleIncome = cycleIncome;
        this.chargeVal = chargeVal;
        this.startTime = startTime;
        this.endTime = endTime;
    }

    public Date getDtime() {
        return dtime;
    }

    public void setDtime(Date dtime) {
        this.dtime = dtime;
    }

    public Double getIncomeVal() {
        return incomeVal;
    }

    public void setIncomeVal(Double incomeVal) {
        this.incomeVal = incomeVal;
    }

    public Double getCycleIncome() {
        return cycleIncome;
    }

    public void setCycleIncome(Double cycleIncome) {
        this.cycleIncome = cycleIncome;
    }

    public Double getChargeVal() {
        return chargeVal;
    }

    public void setChargeVal(Double chargeVal) {
        this.chargeVal = chargeVal;
    }

    public Long getDevCode() {
        return devCode;
    }

    public void setDevCode(Long devCode) {
        this.devCode = devCode;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CostProfitDay that = (CostProfitDay) o;
        return Objects.equals(devCode, that.devCode) &&
                Objects.equals(dtime, that.dtime) &&
                Objects.equals(incomeVal, that.incomeVal) &&
                Objects.equals(cycleIncome, that.cycleIncome) &&
                Objects.equals(chargeVal, that.chargeVal);
    }

    @Override
    public int hashCode() {
        return Objects.hash(devCode, dtime, incomeVal, cycleIncome, chargeVal);
    }

    @Override
    public String toString() {
        return "CostProfitDay{" +
                "devCode=" + devCode +
                ", dtime=" + dtime +
                ", incomeVal=" + incomeVal +
                ", cycleIncome=" + cycleIncome +
                ", chargeVal=" + chargeVal +
                '}';
    }


}
